//
//  CellForLogin.m
//  ProjectA_ManualGuest
//
//  Created by dingcong on 16/6/16.
//  Copyright © 2016年 丁聪. All rights reserved.
//

#import "CellForLogin.h"
#import "Masonry.h"
@implementation CellForLogin


- (void)dealloc
{
    
    [_buttonOfLogin release];
    [super dealloc];
    
    
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self creat];
        self.backgroundColor = [UIColor whiteColor];
    }
    
    return self;
    
    
    
    
}

- (void)creat
{
    
    UIImageView *imageOfLogin = [[UIImageView alloc]init];
    
    imageOfLogin.image = [UIImage imageNamed:@"login.png"];
    [self.contentView addSubview: imageOfLogin];
    
    imageOfLogin.backgroundColor = [UIColor greenColor];
    
    [imageOfLogin mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.contentView.mas_centerX);
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.height.offset(180);
        make.width.offset(240);
        
    }];
    
    
    
    self.buttonOfLogin = [[UIButton alloc]init];
    self.buttonOfLogin.backgroundColor = [UIColor colorWithRed:0.0 / 256.0f  green:208.0 / 256.0f blue:252.0 / 256.0f alpha:1];
    [self.contentView addSubview:self.buttonOfLogin];
    
    [self.buttonOfLogin mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(imageOfLogin.mas_bottom).offset(10);
        make.leading.equalTo(self.contentView.mas_leading).offset(15);
        make.height.offset(44);
        make.width.offset(SCREEN_WIDTH - 30);
        
        
    }];
    self.buttonOfLogin.layer.cornerRadius = 4;
    [self.buttonOfLogin setTitle:@"登录" forState:UIControlStateNormal];
    
    
    
    [self.buttonOfLogin release];
    [imageOfLogin release];
    
    
    
}





@end
